//
//  UIFont+runTime.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/10/11.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "UIFont+runTime.h"
#import <objc/runtime.h>
@implementation UIFont (runTime)

+(void)load{
    Method newMethod = class_getClassMethod([self class], @selector(adjustFont:));
    Method method = class_getClassMethod([self class], @selector(systemFontOfSize:));
    method_exchangeImplementations(newMethod, method);
}
+(UIFont *)adjustFont:(CGFloat)fontsize{
    UIFont *newFont = nil;
    newFont = [UIFont adjustFont:fontsize * [UIScreen mainScreen].bounds.size.width / MyUIScreen];
    return newFont;
}
@end
